home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
demos
/
give`em`hell.amos
/
give`em`hell.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1991-03-06
|
40KB
|
1,615 lines
' Give `Em' Hell
' --------------
' By Ben Ashley � Top Sprite software 1991
' AMOS is � 1990 Mandarin/Jawx
'
' Source Code, Document and Technical .Doc's also included!
'
' The original sprite pic is also on this disk, as a compacted screen!
'
' In case you're low on Memory!
Close Editor : Close Workbench
'
' This disk is � ** CERTIFIED VIRUS FREE ** �
' It also, has an Anti-Virus Bootblock!
'
' As T.P's policy goes, the documents are extensive!
' This game saves the High-Scores to disk!
'
Screen Open 0,320,256,32,Lowres
Curs Off : Flash Off : Cls 0 : Hide On
Colour 1,$FFF
Pen 1 : Paper 0
Centre At(,10)+"Loading...."
DI$="Df0:" : On Error Proc HELP
'
' Incase of extra memory. If you have extra memory, you'll get better sound
' and music!
'
If Chip Free>250000 and Fast Free>0 or Chip Free>400000
MEG1=1
Else
MEG1=0
End If
'
' Get rid of any LURKING BACK-UP files....... ( This bit is here because it
' was useful when debugging!)
'
If Exist("Autoexec.Bak")
Kill "Autoexec.Bak"
End If
' Set up Varibles and arrays!
Dim SK(2) : Dim HOK(2) : Dim AOK(2) : Dim JOK(2) : Dim POK(2)
Dim MEN(2) : Dim XM(2) : Dim YM(2)
Dim TX(2) : Dim TY(2) : Dim PX(2) : Dim PY(2) : Dim JX(2) : Dim JY(2)
Dim HX(2) : Dim HY(2)
Dim TI(2) : Dim HI(2) : Dim MI(2) : Dim JI(2) : Dim PI(2)
Dim T$(2) : Dim D(2) : WINNER=0 : Dim A$(20) : Dim DI(2)
Dim HL(5) : Dim H$(5) : N$="" : SC=0 : Dim FL(2)
' The Damage Arrays
Dim HD(2) : Dim TD(2) : Dim PD(2) : Dim JD(2)
' Shooting flags!
Dim SD(2)
BO=0 : BO2=0 : MF=0 : MF2=0
TF=0 : TF2=0 : HF=0 : HF2=0 : JF=0 : JF2=0
PF=0 : PF2=0
' Give all arrays their default numbers!
For F=1 To 2
SK(F)=0
HOK(F)=1
AOK(F)=1
JOK(F)=1
POK(F)=1
MEN(F)=3
T$(F)="m"
D(F)=1
DI(F)=54
FL(F)=0
Next F
' Set up Hi-Scores+names!
H$(1)="Ben Ashley" : HL(1)=6000
H$(2)="Mat Tucker" : HL(2)=5000
H$(3)="Top Sprite" : HL(3)=4000
H$(4)="M Thatcher" : HL(4)=3000
H$(5)="POLL TAX!?" : HL(5)=2000
If Exist("Df0:Hi-Scores")
Open Random 1,"Hi-Scores"
Field 1,15 As NAME$,5 As SCORE$
For F=1 To 5
Get 1,F
HL(F)=Val(SCORE$)
H$(F)=NAME$
Next F
Close 1
End If
' Make `em global!
Global TX(),TY(),JX(),JY(),PX(),PY(),HX(),HY(),XM(),YM(),HOK(),AOK()
Global JOK(),POK(),MEN(),TI(),MI(),JI(),PI(),HI(),T$(),D(),WINNER,A$(),DI()
Global MEG1,BO,BO2,TF,TF2,JF,JF2,HF,HF2,MF,MF2,SD()
Global H$(),N$,HL(),SK(),SC,FL(),HD(),PD(),TD(),JD()
' only load sound FX and music if there is enough Mem!
GAME
' The main game Loop
Procedure GAME
Do
If MEG1=1
Load "Sound/Samples.Abk",6
Load "Sound/Rock`n'Blow.Abk" : Music 1
End If
Sam Bank 6
Load "Graphics/Title.Pic" : Unpack 5 To 0 : Erase 5
Do
Repeat
If Fire(1) or Fire(0) Then Goto UP1
TIME=TIME+1
Until TIME=6000
Screen Open 1,320,256,16,Lowres : Curs Off : Flash Off : Colour 1,$FFF : Cls 0
Pen 1 : Paper 0 : Ink 1,0
SCORES["Give `Em' Hell","Best 5 Scores"]
Repeat
If Fire(1) or Fire(0) Then Screen Close 1 : Goto UP1
TIME=TIME+1
Until TIME=12000
Screen Open 2,640,256,2,Hires : Curs Off : Flash Off : Colour 1,$FFF : Cls 0
Pen 1 : Paper 0 : Ink 1,0
CREDITS
Screen Close 1
Repeat
If Fire(1) or Fire(0) Then Screen Close 2 : Goto UP1
TIME=TIME+1
Until TIME=25000
TIME=0
Screen Close 2
Loop
UP1:
Screen Close 0
TW1=0
TW2=0
Repeat
Screen Open 0,320,256,16,Lowres
Curs Off : Flash Off : Cls 0
If MEG1=1
Erase 3
End If
Load "Graphics/Back.Abk" : Unpack 5 To 0 : Erase 5
'
' Do all the usual and boring SET-UP stuff!!!!!
'
SETUPSCREEN
'
SET_BOBS
'
' Animation strings
STRINGS
Repeat
K$=Lower$(Inkey$)
If K$="1"
If D(1)=1
If DI(1)=54
DI(1)=0
Bob Off 13
Else
DI(1)=54
Bob 13,125,213,54
End If
End If
End If
P1C
If K$="0"
If D(2)=1
If DI(2)=54
DI(2)=56
Bob Off 14
Else
DI(2)=54
Bob 14,185,213,54
End If
End If
End If
P2C
CHECKS
If Bob Col(1,21 To 21) and WINNER=1
WIN=1
End If
If Bob Col(2,22 To 22) and WINNER=2
WIN=2
End If
If K$="e" Then WIN=3
Until WIN=1 or WIN=2 or WIN=3
If WIN<3
Centre At(,10)+"Player "+Str$(WIN)+" Wins!"
End If
' Wow! At last, I've reached the end of the game!
' This, has to be seen to be believed, so:
' * * * � � G A M E O V E R � � * * *
' ---------------------------------------
Fade 3 : Wait 10*3 : Bob Off : Bob Clear
Screen Open 0,320,256,32,Lowres
Curs Off : Flash Off : Cls 0
Pen 1 : Paper 0 : Ink 1,0
If WIN=1
Load "Graphics/Greenwin.Pic" : Unpack 5 To 0 : Erase 5
Repeat : Until Fire(1) or Fire(0)
End If
If WIN=2
Load "Graphics/Redwin.Pic" : Unpack 5 To 0 : Erase 5
Repeat : Until Fire(1) or Fire(0)
End If
Fade 3 : Wait 10*3
Screen Open 0,320,256,16,Lowres
Colour 1,$FFF
Curs Off : Flash Off : Cls 0
Pen 1 : Paper 0 : Ink 1,0
Centre At(,0)+"Game Over!"
Centre At(,1)+"----------"
Centre At(,3)+" Player 1's score was:"+Str$(SK(1))
Centre At(,4)+" Player 2's score was:"+Str$(SK(2))
Centre At(,6)+"Press Fire!"
Repeat : Until Fire(1) or Fire(0)
Print : Print
If SK(1)>HL(5)
Input "Your Name Player 1:";N1$
N$=N1$ : SC=SK(1)
Cls 0
SCORES["Hi-Score State after","Player 1's score!"]
Repeat : Until Fire(1) or Fire(0)
End If
If SK(2)>HL(5)
Input "Your Name Player 2:";N1$
N$=N1$ : SC=SK(2)
Cls 0
SCORES["Hi-Score State after","Player 2's Score!"]
Repeat : Until Fire(1) or Fire(0)
End If
' Save all of the Hi-Scores!
Open Random 1,"Hi-Scores"
Field 1,15 As NAME$,5 As SCORE$
For F=1 To 5
NAME$=H$(F)
SCORE$=Str$(HL(F))
Put 1,F
Next F
Close 1
If WIN=1
TW1=TW1+1
Else
TW2=TW2+1
End If
GOES=GOES+1
WIN=0
WINNER=0
RESETVALUES
Until GOES=3
GOES=0
Loop
End Proc
' Set Up the screen, (Set CO-Ords, and place ground!)
Procedure SETUPSCREEN
Pen 1 : Paper 0 : Ink 1,0
Locate 0,0 : Curs Off
Print " * Give `Em' Hell. By Ben Ashley 1991 * "
Get Sprite Palette
' Place the grass
For F=0 To 320 Step 10
Paste Bob F,230,48
Next F
' Set up ALL of the Co-Ordinates for the Bobs
XM(1)=0 : YM(1)=226 : MI(1)=1
XM(2)=310 : YM(2)=226 : MI(2)=12
JX(1)=20 : JY(1)=220 : JI(1)=17
JX(2)=290 : JY(2)=220 : JI(2)=21
HX(1)=40 : HY(1)=220 : HI(1)=23
HX(2)=270 : HY(2)=220 : HI(2)=27
TX(1)=60 : TY(1)=220 : TI(1)=31
TX(2)=245 : TY(2)=220 : TI(2)=35
PX(1)=80 : PY(1)=220 : PI(1)=37
PX(2)=225 : PY(2)=220 : PI(2)=38
Double Buffer
End Proc
' Set the Bobs!
Procedure SET_BOBS
On Error Proc HELP
' The 2 men
If T$(1)="m"
Bob 1,XM(1),YM(1),MI(1)
End If
If T$(2)="m"
Bob 2,XM(2),YM(2),MI(2)
End If
' The 2 Jeeps
If JOK(1)=1
Bob 3,JX(1),JY(1),JI(1)
End If
If JOK(2)=1
Bob 4,JX(2),JY(2),JI(2)
End If
' The 2 Helicoptors
If HOK(1)=1
Bob 5,HX(1),HY(1),HI(1)
End If
If HOK(2)=1
Bob 6,HX(2),HY(2),HI(2)
End If
' The 2 Tanks
If AOK(1)=1
Bob 7,TX(1),TY(1),TI(1)
End If
If AOK(2)=1
Bob 8,TX(2),TY(2),TI(2)
End If
' The 2 planes
If POK(1)=1
Bob 9,PX(1),PY(1),PI(1)
End If
If POK(2)=1
Bob 10,PX(2),PY(2),PI(2)
End If
' The 2 Mountains!
Bob 11,90,213,55
Bob 12,185,213,53
' The 2 Guard Doors!
If D(1)=1
Bob 13,125,213,54
End If
If D(2)=1
Bob 14,185,213,54
End If
' The 4 Flags!
Bob 21,0,215,58
Bob 22,290,215,59
Bob 24,0,200,58
Bob 25,290,200,59
End Proc
' Player 1 other control
Procedure P1C
On Error Proc HELP
If MEN(1)>-1
If Fire(1)
If T$(1)="m"
If Bob Col(1,3 To 3)
If JOK(1)=1
T$(1)="j"
Bob Off 1
Amal Off 1
Channel 3 To Bob 3
Amal 3,A$(3)
Amal On 3
End If
End If
If Bob Col(1,5 To 5)
If HOK(1)=1
T$(1)="h"
Bob Off 1
Amal Off 1
Channel 5 To Bob 5
Amal 5,A$(5)
Amal On 5
End If
End If
If Bob Col(1,7 To 7)
If AOK(1)=1
T$(1)="t"
Bob Off 1
Amal Off 1
Channel 7 To Bob 7
Amal 7,A$(7)
Amal On 7
End If
End If
If Bob Col(1,9 To 9)
If POK(1)=1
T$(1)="p"
Bob Off 1
Amal Off 1
Channel 9 To Bob 9
Amal 9,A$(9)
Amal On 9
End If
End If
End If
If T$(1)="p"
If Y Bob(9)<220 and BO=0
BO=1
Bob 15,X Bob(9),Y Bob(9)+20,47
Channel 11 To Bob 15
Amal 11,"M 0,300,200;"
Amal On 11
End If
End If
If T$(1)="m"
MF=1
SOUNDFX_2
Bob 18,X Bob(1),Y Bob(1)-5,43
Channel 13 To Bob 18
If I Bob(1)>3 and I Bob(1)<7
Amal 13,"M -400,0,250" : Amal On 13
End If
If I Bob(1)>0 and I Bob(1)<4
Amal 13,"M 400,0,250" : Amal On 13
End If
End If
If T$(1)="t"
TF=1
SOUNDFX_2
Bob 18,X Bob(7),Y Bob(7)-2,45
Channel 13 To Bob 18
If I Bob(7)=31
Amal 13,"M 400,0,100"
End If
If I Bob(7)=32
Amal 13,"M -400,0,100"
End If
Amal On 13
End If
End If
If Jleft(1)
If T$(1)="p"
If Y Bob(9)=220
T$(1)="m"
XM(1)=X Bob(9)
Amal Off 9
Bob 1,XM(1),YM(1),MI(1)
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
End If
If PF=0
SOUNDFX_3
Bob 20,X Bob(9),Y Bob(9),44
Channel 14 To Bob 20
Amal 14,"M 400,0,100" : Amal On 14
PF=1
End If
End If
End If
If Jdown(1)
If T$(1)="j"
T$(1)="m"
Amal Off 3
XM(1)=X Bob(3)
Bob 1,XM(1),YM(1),MI(1)
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
End If
If T$(1)="h"
If Y Bob(5)=220 or Y Bob(5)=221
Amal Off 5
XM(1)=X Bob(5)
T$(1)="m"
Bob 1,XM(1),YM(1),MI(1)
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
Amal Off 5
End If
End If
If T$(1)="t"
T$(1)="m"
Amal Off 7
XM(1)=X Bob(7)
Bob 1,XM(1),YM(1),MI(1)
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
End If
End If
End If
End Proc
' Player 2 other control
Procedure P2C
On Error Proc HELP
If MEN(2)>-1
If Fire(0)
If T$(2)="m"
If Bob Col(2,4 To 4)
If JOK(2)=1
T$(2)="j"
Bob Off 2
Amal Off 2
Channel 4 To Bob 4
Amal 4,A$(4)
Amal On 4
End If
End If
If Bob Col(2,6 To 6)
If HOK(2)=1
T$(2)="h"
Bob Off 2
Amal Off 2
Channel 6 To Bob 6
Amal 6,A$(6)
Amal On 6
End If
End If
If Bob Col(2,8 To 8)
If AOK(2)=1
T$(2)="t"
Bob Off 2
Amal Off 2
Channel 8 To Bob 8
Amal 8,A$(8)
Amal On 8
End If
End If
If Bob Col(2,10 To 10)
If POK(2)=1
T$(2)="p"
Bob Off 2
Amal Off 2
Channel 10 To Bob 10
Amal 10,A$(10)
Amal On 10
End If
End If
End If
If T$(2)="p"
If Y Bob(10)<220 and BO2=0
BO2=1
Bob 16,X Bob(10),Y Bob(10)+20,47
Channel 12 To Bob 16
Amal 12,"M 0,300,200;"
Amal On 12
End If
End If
If T$(2)="m"
MF2=1
SOUNDFX_2
Bob 17,X Bob(2),Y Bob(2)-5,43
Channel 12 To Bob 17
If I Bob(2)>11 and I Bob(2)<15
Amal 12,"M -400,0,250" : Amal On 12
End If
If I Bob(2)>8 and I Bob(2)<12
Amal 12,"M 400,0,250" : Amal On 12
End If
End If
If T$(2)="t"
TF2=1
SOUNDFX_2
Bob 17,X Bob(8),Y Bob(8)-2,45
Channel 12 To Bob 17
If I Bob(8)=34
Amal 12,"M 400,0,100"
End If
If I Bob(8)=35
Amal 12,"M -400,0,100"
End If
Amal On 12
End If
End If
If Jright(0)
If T$(2)="p"
If Y Bob(10)=220
T$(2)="m"
XM(2)=X Bob(10)
Amal Off 10
Bob 2,XM(2),YM(2),MI(2)
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
End If
If PF2=0
SOUNDFX_3
Bob 19,X Bob(10),Y Bob(10),44
Channel 15 To Bob 19
Amal 15,"M -400,0,100" : Amal On 15
PF2=1
End If
End If
End If
If Jdown(0)
If T$(2)="j"
T$(2)="m"
Amal Off 4
XM(2)=X Bob(4)
Bob 2,XM(2),YM(2),MI(2)
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
End If
If T$(2)="h"
If Y Bob(6)=220 or Y Bob(6)=221
Amal Off 6
XM(2)=X Bob(6)
T$(2)="m"
Bob 2,XM(2),YM(2),MI(2)
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
Amal Off 6
End If
End If
If T$(2)="t"
T$(2)="m"
Amal Off 8
XM(2)=X Bob(8)
Bob 2,XM(2),YM(2),MI(2)
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
End If
End If
End If
End Proc
' Player 1 Die Animation
Procedure P1DIE
SOUNDFX_4
If T$(1)="m"
If I Bob(1)>=1 or I Bob(1)<=3
Paste Bob X Bob(1),231,7
Else
Paste Bob X Bob(1),231,8
End If
End If
MEN(1)=MEN(1)-1
If MEN(1)<0
WINNER=2
End If
XM(1)=0
T$(1)="m"
Bob 1,XM(1),YM(1),MI(1)
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
End Proc
' Player 2 Die Animation
Procedure P2DIE
SOUNDFX_4
If T$(2)="m"
If I Bob(2)>=9 or I Bob(2)<=11
Paste Bob X Bob(2),231,15
Else
Paste Bob X Bob(2),231,16
End If
End If
MEN(2)=MEN(2)-1
If MEN(2)<0
WINNER=1
End If
T$(2)="m"
XM(2)=300
Bob 2,XM(2),YM(2),MI(2)
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
End Proc
' Collision and Score checks, e.t.c (Massive procedure)
Procedure CHECKS
On Error Proc HELP
If Bob Col(7,13 To 13)
SOUNDFX_6
Bob Off 13 : D(1)=0
Add SK(1),10
End If
If Bob Col(7,14 To 14)
SOUNDFX_6
Bob Off 14 : D(2)=0
Add SK(1),10
End If
If Bob Col(1,13 To 13)
XM(1)=X Bob(13)
If X Bob(1)<X Bob(13)
Add XM(1),-10
Bob 1,XM(1),YM(1),MI(1)
Else
Add XM(1),10
Bob 1,XM(1),YM(1),MI(1)
End If
End If
If Bob Col(3,13 To 13)
JX(1)=X Bob(13)
If X Bob(3)<X Bob(13)
Add JX(1),-20
Else
Add JX(1),20
End If
Bob 3,JX(1),JY(1),JI(1)
End If
If Bob Col(3,14 To 14)
JX(1)=X Bob(14)
If X Bob(3)<X Bob(14)
Add JX(1),-20
Else
Add JX(1),20
End If
Bob 3,JX(1),JY(1),JI(1)
End If
If Bob Col(1,14 To 14)
XM(1)=X Bob(14)
If X Bob(1)<X Bob(14)
Add XM(1),-10
Bob 1,XM(1),YM(1),MI(1)
Else
Add XM(1),10
Bob 1,XM(1),YM(1),MI(1)
End If
End If
If HOK(1)=1
If Y Bob(5)>220
HY(1)=Y Bob(5)
HX(1)=X Bob(5) : HY(1)=220
Bob 5,HX(1),HY(1),HI(1)
End If
End If
If Bob Col(8,13 To 13)
SOUNDFX_6
Bob Off 13 : D(1)=0
Add SK(2),10
End If
If Bob Col(8,14 To 14)
SOUNDFX_6
Bob Off 14 : D(2)=0
Add SK(2),10
End If
If Bob Col(2,13 To 13)
XM(2)=X Bob(13)
If X Bob(2)<X Bob(13)
Add XM(2),-10
Bob 2,XM(2),YM(2),MI(2)
Else
Add XM(2),10
Bob 2,XM(2),YM(2),MI(2)
End If
End If
If Bob Col(4,13 To 13)
JX(2)=X Bob(13)
If X Bob(4)<X Bob(13)
Add JX(2),-20
Else
Add JX(2),20
End If
Bob 4,JX(2),JY(2),JI(2)
End If
If Bob Col(4,14 To 14)
JX(2)=X Bob(14)
If X Bob(4)<X Bob(14)
Add JX(2),-20
Else
Add JX(2),20
End If
Bob 4,JX(2),JY(2),JI(2)
End If
If Bob Col(2,14 To 14)
XM(2)=X Bob(14)
If X Bob(2)<X Bob(14)
Add XM(2),-10
Bob 2,XM(2),YM(2),MI(2)
Else
Add XM(2),10
Bob 2,XM(2),YM(2),MI(2)
End If
End If
If HOK(2)=1
If Y Bob(6)>220
HY(2)=Y Bob(6)
HX(2)=X Bob(6) : HY(2)=220
Bob 6,HX(2),HY(2),HI(2)
End If
End If
If Bob Col(5,11 To 12) or Bob Col(5,6 To 6) or Bob Col(5,9 To 9) or Bob Col(5,10 To 10)
SOUNDFX_1
Amal Off 5
Channel 5 To Bob 5
Amal 5," Anim 1,(39,20)(40,20)(41,20)(42,20) ; Let RA=1 "
Amal On 5
Add SK(2),20
End If
If Bob Col(6,11 To 12) or Bob Col(6,5 To 5) or Bob Col(6,9 To 9) or Bob Col(6,10 To 10)
SOUNDFX_1
Amal Off 6
Channel 6 To Bob 6
Amal 6," Anim 1,(39,20)(40,20)(41,20)(42,20) ; Let RJ=1 "
Amal On 6
Add SK(1),20
End If
If Bob Col(9,9 To 14) or Bob Col(15,9 To 9) or Bob Col(19,9 To 9)
SOUNDFX_1
Amal Off 9
Channel 9 To Bob 9
Amal 9," Anim 1,(39,20)(40,20)(41,20)(42,20); Let RB=1 "
Amal On 9
Add SK(2),20
End If
If Bob Col(10,9 To 14) or Bob Col(15,10 To 10) or Bob Col(20,10 To 10)
SOUNDFX_1
Amal Off 10
Channel 10 To Bob 10
Amal 10," Anim 1,(39,20)(40,20)(41,20)(42,20); Let RI=1 "
Amal On 10
Add SK(1),20
End If
If Amreg(0)=1
Amreg(0)=0
HOK(1)=0
Paste Bob X Bob(5),220,29
If T$(1)="h"
T$(1)="m"
XM(1)=X Bob(5)
Bob 1,XM(1),YM(1),MI(1)
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
End If
Bob Off 5
End If
If Amreg(9)=1
Amreg(9)=0
If T$(2)="h"
HOK(2)=0
Paste Bob X Bob(6),220,30
T$(2)="m"
XM(2)=X Bob(6)
Bob 2,XM(2),YM(2),MI(2)
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
End If
Bob Off 6
End If
If Amreg(1)=1
Amreg(1)=0
POK(1)=0
If T$(1)="p"
T$(1)="m"
XM(1)=X Bob(9)
Bob 1,XM(1),YM(1),MI(1)
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
End If
Bob Off 9
End If
If Amreg(8)=1
Amreg(8)=0
POK(2)=0
If T$(2)="p"
T$(2)="m"
XM(2)=X Bob(10)
Bob 2,XM(2),YM(2),MI(2)
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
End If
Bob Off 10
End If
If T$(1)="m"
If X Bob(1)<0
Bob 1,0,YM(1),MI(1)
End If
If X Bob(1)>320
Bob 1,310,YM(1),MI(1)
End If
End If
If T$(1)="p"
If X Bob(9)>320
Bob 9,0,Y Bob(9),I Bob(9)
End If
End If
If BO=1
If Y Bob(15)>230
BO=0
SOUNDFX_5
Bob 15,X Bob(15),200,51
Channel 11 To Bob 15
Amal 11,"A 2,(51,20)(52,20) ; Let RK=1 "
Amal On 11
End If
End If
If BO2=1
If Y Bob(16)>230
BO2=0
SOUNDFX_5
Bob 16,X Bob(16),200,51
Channel 12 To Bob 16
Amal 12,"A 2,(51,20)(52,20) ; Let RL=1 "
Amal On 12
End If
End If
If Amreg(10)=1
Amreg(10)=0
Paste Bob X Bob(15),230,49
Bob Off 15
Amal Off 11
BO=0
End If
If Amreg(11)=1
Amreg(11)=0
Paste Bob X Bob(16),230,49
Bob Off 16
Amal Off 12
BO2=0
End If
' The lines below are the BOMB checks. To see if someone has just got
' nuked!
If Bob Col(15,2 To 2)
Bob Off 15
BO=0
P2DIE
Add SK(1),30
End If
If Bob Col(16,1 To 1)
Bob Off 16
BO2=0
P1DIE
Add SK(2),30
End If
If Bob Col(18,4 To 4)
JD(2)=JD(2)+1
If JD(2)>5
If T$(2)="j"
P2DIE
End If
JOK(2)=0
Paste Bob X Bob(4),Y Bob(4),22
Bob Off 4
SOUNDFX_1
Add SK(1),40
End If
End If
If Bob Col(17,3 To 3)
JD(1)=JD(1)+1
If JD(1)>5
If T$(1)="j"
P1DIE
End If
JOK(1)=0
Paste Bob X Bob(4),Y Bob(4),19
Bob Off 3
SOUNDFX_1
Add SK(2),40
End If
End If
If Bob Col(15,6 To 6)
HD(2)=HD(2)+1
If HD(2)>10
If T$(2)="h"
P2DIE
End If
HOK(2)=0
Paste Bob X Bob(6),Y Bob(6),30
Bob Off 6
SOUNDFX_1
Add SK(1),40
End If
End If
If Bob Col(15,5 To 5)
HD(1)=HD(1)+1
If HD(1)>10
If T$(1)="h"
P1DIE
End If
HOK(1)=0
Paste Bob X Bob(5),Y Bob(5),29
Bob Off 5
SOUNDFX_1
Add SK(2),40
End If
End If
If Bob Col(15,8 To 8) or Bob Col(18,8 To 8)
TD(2)=TD(2)+1
If TD(2)>6
If T$(2)="t"
P2DIE
End If
AOK(2)=0
Paste Bob X Bob(8),Y Bob(8),36
Bob Off 8
SOUNDFX_1
Add SK(1),50
End If
End If
If Bob Col(15,7 To 7) or Bob Col(17,7 To 7)
TD(1)=TD(1)+1
If TD(1)>6
If T$(1)="t"
P1DIE
End If
AOK(1)=0
Paste Bob X Bob(7),Y Bob(7),33
Bob Off 7
SOUNDFX_1
Add SK(2),50
End If
End If
If Bob Col(16,6 To 6)
HD(2)=HD(2)+1
If HD(2)>10
If T$(2)="h"
P2DIE
End If
HOK(2)=0
Bob Off 6
SOUNDFX_1
Add SK(1),10
End If
End If
If Bob Col(16,5 To 5)
HD(1)=HD(1)+1
If HD(1)>10
If T$(1)="h"
P1DIE
End If
HOK(1)=0
Bob Off 5
SOUNDFX_1
Add SK(2),10
End If
End If
If Bob Col(16,8 To 8)
TD(2)=TD(2)+1
If TD(2)>6
If T$(2)="t"
P2DIE
End If
AOK(2)=0
Paste Bob X Bob(8),Y Bob(8),36
Bob Off 8
SOUNDFX_1
Add SK(1),20
End If
End If
If Bob Col(16,7 To 7)
TD(1)=TD(1)+1
If TD(1)>6
If T$(1)="t"
P1DIE
End If
AOK(1)=0
Paste Bob X Bob(7),Y Bob(7),33
Bob Off 7
SOUNDFX_1
Add SK(2),20
End If
End If
If Bob Col(10,15 To 16)
PD(2)=PD(2)+1
If PD(2)>3
If T$(2)="p"
P2DIE
End If
POK(2)=0
Bob Off 10
SOUNDFX_1
Add SK(1),30
End If
End If
If Bob Col(9,15 To 16)
PD(1)=PD(1)+1
If PD(1)>3
If T$(1)="p"
P1DIE
End If
POK(1)=0
Bob Off 9
SOUNDFX_1
Add SK(2),30
End If
End If
' Below are all of the Co-Ordinate checks, which stops stuff going off
' screen, and stuff like that!
If T$(2)="p"
If X Bob(10)<0
PX(2)=320
Bob 10,PX(2),Y Bob(10),PI(2)
End If
If Y Bob(10)<0
Bob 10,X Bob(10),0,I Bob(10)
End If
End If
If T$(1)="p"
If Y Bob(9)<0
Bob 9,X Bob(9),0,I Bob(9)
End If
End If
If T$(2)="m"
If X Bob(2)>320
XM(2)=310
Bob 2,XM(2),YM(2),MI(2)
End If
If X Bob(2)<0
XM(2)=0
Bob 2,XM(2),YM(2),MI(2)
End If
End If
If T$(1)="j"
If X Bob(3)>310
Bob 3,310,JY(1),JI(1)
End If
If X Bob(3)<0
Bob 3,0,JY(1),JI(1)
End If
End If
If T$(2)="j"
If X Bob(4)>310
Bob 4,310,JY(2),JI(2)
End If
If X Bob(4)<0
Bob 4,0,JY(2),JI(2)
End If
End If
If T$(1)="t"
If X Bob(7)>310
Bob 7,310,TY(1),TI(1)
End If
If X Bob(7)<0
Bob 7,0,TY(1),TI(1)
End If
End If
If T$(2)="t"
If X Bob(8)>310
Bob 8,320,TY(2),TI(2)
End If
If X Bob(8)<0
Bob 8,0,TY(2),TI(2)
End If
End If
If T$(1)="h"
If X Bob(5)>310
Bob 5,310,Y Bob(5),HI(1)
End If
If X Bob(5)<0
Bob 5,0,Y Bob(5),HI(1)
End If
If Y Bob(5)<0
Bob 5,X Bob(5),0,I Bob(5)
End If
End If
If T$(2)="h"
If X Bob(6)>310
Bob 6,310,Y Bob(6),HI(2)
End If
If X Bob(6)<0
Bob 6,0,Y Bob(6),HI(2)
End If
If Y Bob(6)<0
Bob 6,X Bob(6),0,I Bob(6)
End If
End If
' Below are all of the shooting conditions!
If Bob Col(17,1 To 1)
Bob Off 17
P1DIE
Add SK(2),15
End If
If Bob Col(18,2 To 2)
Bob Off 18
P2DIE
Add SK(1),15
End If
If Bob Col(17,5 To 5)
Bob Off 17
Add SK(2),10
End If
If Bob Col(18,6 To 6)
Bob Off 18
Add SK(2),10
End If
' Someone gets squashed
If Bob Col(7,2 To 2)
P2DIE
Add SK(1),5
End If
If Bob Col(8,1 To 1)
P1DIE
Add SK(2),5
End If
If Bob Col(3,2 To 2)
P2DIE
Add SK(1),10
End If
If Bob Col(1,4 To 4)
P1DIE
Add SK(2),10
End If
If Bob Col(10,1 To 1)
P1DIE
Add SK(2),10
End If
If Bob Col(9,2 To 2)
P2DIE
Add SK(1),10
End If
' Turn Bombs off when things hit mountains!
If Bob Col(15,11 To 12)
SOUNDFX_1
Bob Off 15
End If
If Bob Col(16,11 To 12)
SOUNDFX_1
Bob Off 16
End If
' Plane Fire!
If PF=1
If X Bob(20)<0
Bob Off 20
PF=0
End If
End If
If PF2=1
If X Bob(19)>320
Bob Off 10
PF2=0
End If
End If
If Bob Col(20,11 To 14)
Bob Off 20
End If
If Bob Col(19,11 To 14)
Bob Off 19
End If
' Turn off stuff
If POK(2)=0
Bob Off 16
Bob Off 19
End If
If POK(1)=0
Bob Off 15
Bob Off 20
End If
If Bob Col(20,2 To 2)
P2DIE
Add SK(1),40
End If
If Bob Col(19,1 To 1)
P1DIE
Add SK(2),40
End If
If Bob Col(17,11 To 14)
Bob Off 17
End If
If Bob Col(18,11 To 14)
Bob Off 18
End If
' Keep AMAL running if you're a man!
If T$(1)="m"
Bob 1,X Bob(1),Y Bob(1),I Bob(1)
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
End If
If T$(2)="m"
Bob 2,X Bob(2),Y Bob(2),I Bob(2)
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
End If
' Flag Checks
If Bob Col(3,22 To 22)
WINNER=1
Bob Off 22
Add SK(1),2000
Bell 90
End If
XM(1)=X Bob(1)
If Bob Col(4,21 To 21)
WINNER=2
Bob Off 21
Add SK(2),2000
Bell 90
End If
If WINNER=1
If MEN(2)<0
HOK(2)=0
POK(2)=0
JOK(2)=0
AOK(2)=0
Bob Off 2
Amal Off 2
Bob Off 4
Amal Off 4
Bob Off 6
Amal Off 6
Bob Off 8
Amal Off 8
Bob Off 10
Amal Off 10
End If
End If
If WINNER=2
If MEN(1)<0
HOK(1)=0
POK(1)=0
JOK(1)=0
AOK(1)=0
Bob Off 1
Amal Off 1
Bob Off 3
Amal Off 3
Bob Off 5
Amal Off 7
Bob Off 7
Amal Off 9
Bob Off 9
End If
End If
' Check for planes going to mine!
If T$(1)="p"
If Y Bob(9)>221
SOUNDFX_1
XM(1)=X Bob(9)
Bob Off 9
POK(1)=0
T$(1)="m"
End If
End If
If T$(2)="p"
If Y Bob(10)>221
SOUNDFX_1
XM(2)=X Bob(10)
Bob Off 10
POK(2)=0
T$(2)="m"
End If
End If
' Stop veichles going passed each other!
If Bob Col(7,5 To 5)
X=X Bob(7)
X2=X Bob(5)
If X<X2
X=X-10
Else
X2=X2+10
End If
Bob 7,X,Y Bob(7),I Bob(7)
Bob 5,X2,Y Bob(5),I Bob(5)
End If
If Bob Col(6,8 To 8)
X21=X Bob(6)
X22=X Bob(8)
If X21<X22
X21=X21-10
Else
X22=X22+10
End If
Bob 6,X21,Y Bob(6),I Bob(6)
Bob 8,X22,Y Bob(8),I Bob(8)
End If
If Bob Col(3,5 To 5)
X=X Bob(3)
X2=X Bob(5)
If X<X2
X=X-10
Else
X2=X2+10
End If
Bob 3,X,Y Bob(3),I Bob(3)
Bob 5,X2,Y Bob(5),I Bob(5)
End If
If Bob Col(4,6 To 6)
X21=X Bob(4)
X22=X Bob(6)
If X21<X22
X21=X21-10
Else
X22=X22+10
End If
Bob 4,X21,Y Bob(4),I Bob(4)
Bob 6,X22,Y Bob(6),I Bob(6)
End If
If Bob Col(7,9 To 9)
X=X Bob(7)
X2=X Bob(9)
If X<X2
X=X-10
Else
X2=X2+10
End If
Bob 7,X,Y Bob(7),I Bob(7)
Bob 9,X2,Y Bob(9),I Bob(9)
End If
If Bob Col(8,10 To 10)
X21=X Bob(8)
X22=X Bob(10)
If X21<X22
X21=X21-10
Else
X22=X22+10
End If
Bob 8,X21,Y Bob(8),I Bob(8)
Bob 10,X22,Y Bob(10),I Bob(10)
End If
' Last 2 flag checks!
If Bob Col(24,6 To 6)
Add SK(1),2000
FL(1)=1
Bob Off 24
Bell 90
End If
If Bob Col(25,5 To 5)
Add SK(1),2000
FL(2)=1
Bob Off 25
Bell 90
End If
End Proc
' Reset values after a game!
Procedure RESETVALUES
BO=0 : BO2=0 : MF=0 : MF2=0
TF=0 : TF2=0 : HF=0 : HF2=0 : JF=0 : JF2=0
PF=0 : PF2=0
' Give all arrays their default numbers!
For F=1 To 2
SK(F)=0
HOK(F)=1
AOK(F)=1
JOK(F)=1
POK(F)=1
MEN(F)=3
T$(F)="m"
D(F)=1
DI(F)=54
FL(F)=0
Next F
End Proc
' Explosion! '
Procedure SOUNDFX_1
If MEG1=1
Sam Play 1000,1,8000
Else
Boom
End If
End Proc
' Gun Shot
Procedure SOUNDFX_2
If MEG1=1
Sam Play 100,2,8000
Else
Shoot
End If
End Proc
' Plane fire
Procedure SOUNDFX_3
If MEG1=1
Sam Play 10,3,8000
Else
Shoot
End If
End Proc
' Death!
Procedure SOUNDFX_4
If MEG1=1
Sam Play 1,4,8000
Else
Bell 6
End If
End Proc
' Massive Atom Explosion!!! !"�$%^
Procedure SOUNDFX_5
If MEG1=1
Sam Play 1
Else
Boom : Boom : Boom
End If
End Proc
' Door Blast!
Procedure SOUNDFX_6
If MEG1=1
Sam Play 1,6,8000
Else
Boom
End If
End Proc
' The Hi-Score table routine (V1.0)
Procedure SCORES[TITLE$,TITLE2$]
Colour 1,$FFF
Curs Off : Flash Off : Hide On : Cls 0
Pen 1 : Paper 0
Centre At(,1)+TITLE$
Centre At(,3)+TITLE2$
' Work out position
K$=""
If SC>HL(1) Then POS=1 : K$=H$(1) : H$(1)=N$ : HL(1)=SC
If SC>HL(2) and SC<HL(1) Then POS=2 : K$=H$(2) : H$(2)=N$ : HL(2)=SC
If SC>HL(3) and SC<HL(2) Then POS=3 : K$=H$(3) : H$(3)=N$ : HL(3)=SC
If SC>HL(4) and SC<HL(3) Then POS=4 : K$=H$(4) : H$(4)=N$ : HL(4)=SC
If SC>HL(5) and SC<HL(4) Then POS=5 : K$=H$(5) : H$(5)=N$ : HL(5)=SC
If SC<HL(5) Then POS=6
' Display High Score Table for the first time
Pen 5
N=1
For F=10 To 14
Print At(10,F);H$(N)
N=N+1
Next F
Pen 7
N=1
For F=10 To 14
Print At(22,F);HL(N)
N=N+1
Next F
End Proc
' Set up all 10 AMAL strings
Procedure STRINGS
' This procedure defines ALL 10 of the AMAL Channels.
' The number in the array A$, is always the same as the bob number
' and the AMAL channel. This makes life easier and less complicated!
' So, A$(1)=Bob 1 and AMAL Channel 1.(Player 1 Man!)
'
' Player 1's Man
A$(1)="Begin:"
A$(1)=A$(1)+"If J1&4 then Jump G ; " : Rem Left
A$(1)=A$(1)+"If J1&8 then Jump H ; " : Rem Right
A$(1)=A$(1)+" Jump Begin ; "
A$(1)=A$(1)+"G: Anim 1,(4,2)(5,2)(6,2) ; M -3,0,3 ; Jump Begin ; "
A$(1)=A$(1)+"H: Anim 1,(1,2)(2,2)(3,2) ; M 3,0,3 ; Jump Begin ; "
Channel 1 To Bob 1
Amal 1,A$(1)
Amal On 1
' Player 2's man
A$(2)="Begin:"
A$(2)=A$(2)+"If J0&4 then Jump G ; " : Rem Left
A$(2)=A$(2)+"If J0&8 then Jump H ; " : Rem Right
A$(2)=A$(2)+" Jump Begin ; "
A$(2)=A$(2)+"G: Anim 1,(12,2)(13,2)(14,2) ; M -3,0,3 ; Jump Begin ; "
A$(2)=A$(2)+"H: Anim 1,(9,2)(10,2)(11,2) ; M 3,0,3 ; Jump Begin ; "
Channel 2 To Bob 2
Amal 2,A$(2)
Amal On 2
' Player 1's Jeep
A$(3)="Begin:"
A$(3)=A$(3)+"If J1&4 then Jump G ; " : Rem Left
A$(3)=A$(3)+"If J1&8 then Jump H ; " : Rem Right
A$(3)=A$(3)+" Jump Begin ; "
A$(3)=A$(3)+"G: Anim 0,(18,2); M -3,0,2 ; Jump Begin ; "
A$(3)=A$(3)+"H: Anim 0,(17,2); M 3,0,2 ; Jump Begin ; "
' Player 2's Jeep
A$(4)="Begin:"
A$(4)=A$(4)+"If J0&4 then Jump G ; " : Rem Left
A$(4)=A$(4)+"If J0&8 then Jump H ; " : Rem Right
A$(4)=A$(4)+" Jump Begin ; "
A$(4)=A$(4)+"G: Anim 0,(21,2); M -3,0,2 ; Jump Begin ; "
A$(4)=A$(4)+"H: Anim 0,(20,2); M 3,0,2 ; Jump Begin ; "
' Player 1's Helicopter
A$(5)="Begin:"
A$(5)=A$(5)+"If J1&4 then Jump G ; "
A$(5)=A$(5)+"If J1&8 then Jump H ; "
A$(5)=A$(5)+"If J1&1 then Jump I ; "
A$(5)=A$(5)+"M 0,2,2; Jump Begin ; "
A$(5)=A$(5)+"G: A 0,(24,1); M -3,0,3; Jump Begin ; "
A$(5)=A$(5)+"H: A 0,(23,1); M 3,0,3; Jump Begin ; "
A$(5)=A$(5)+"I: M 0,-5,5; Jump Begin ; "
' Player 2's Helicopter
A$(6)="Begin:"
A$(6)=A$(6)+"If J0&4 then Jump G ; "
A$(6)=A$(6)+"If J0&8 then Jump H ; "
A$(6)=A$(6)+"If J0&1 then Jump I ; "
A$(6)=A$(6)+"M 0,2,2; Jump Begin ; "
A$(6)=A$(6)+"G: A 0,(27,1); M -3,0,3; Jump Begin ; "
A$(6)=A$(6)+"H: A 0,(26,1); M 3,0,3; Jump Begin ; "
A$(6)=A$(6)+"I: M 0,-5,5; Jump Begin ; "
' Player 1's Tank
A$(7)="Begin:"
A$(7)=A$(7)+"If J1&4 then Jump G ; " : Rem Left
A$(7)=A$(7)+"If J1&8 then Jump H ; " : Rem Right
A$(7)=A$(7)+" Jump Begin ; "
A$(7)=A$(7)+"G: Anim 0,(32,2); M -3,0,6 ; Jump Begin ; "
A$(7)=A$(7)+"H: Anim 0,(31,2); M 3,0,6 ; Jump Begin ; "
' Player 2's Tank
A$(8)="Begin:"
A$(8)=A$(8)+"If J0&4 then Jump G ; " : Rem Left
A$(8)=A$(8)+"If J0&8 then Jump H ; " : Rem Right
A$(8)=A$(8)+" Jump Begin ; "
A$(8)=A$(8)+"G: Anim 0,(35,2); M -3,0,6 ; Jump Begin ; "
A$(8)=A$(8)+"H: Anim 0,(34,2); M 3,0,6 ; Jump Begin ; "
' Player 1's Plane
A$(9)="Begin :"
A$(9)=A$(9)+"If J1&1 then Jump G ; "
A$(9)=A$(9)+"If J1&4 then Jump Begin ; "
A$(9)=A$(9)+"If J1&8 then Jump H ; "
A$(9)=A$(9)+"If J1&15 then Jump I ; "
A$(9)=A$(9)+"Jump Begin ; "
A$(9)=A$(9)+"G: M 0,-10,5 ; Jump Begin;"
A$(9)=A$(9)+"H: M 10,0,5 ; Jump Begin;"
A$(9)=A$(9)+"I: M 0,10,5; Jump Begin ;"
' Player 2's Plane
A$(10)="Begin :"
A$(10)=A$(10)+"If J0&1 then Jump G ; "
A$(10)=A$(10)+"If J0&8 then Jump Begin ; "
A$(10)=A$(10)+"If J0&4 then Jump H ; "
A$(10)=A$(10)+"If J0&15 then Jump I ; "
A$(10)=A$(10)+"Jump Begin ; "
A$(10)=A$(10)+"G: M 0,-10,5 ; Jump Begin;"
A$(10)=A$(10)+"H: M -10,0,5 ; Jump Begin;"
A$(10)=A$(10)+"I: M 0,10,5; Jump Begin ;"
End Proc
' Who did, what? Why? How? and Where? (!!)
Procedure CREDITS
Centre At(,0)+"Give `Em' Hell Credits"
Centre At(,1)+"----------------------"
Centre At(,3)+"Game Design and Programming: Ben Ashley "
Centre At(,4)+"Music and Graphics : Ben Ashley "
Centre At(,5)+"Ideas and problem help : Matt Tucker "
Centre At(,6)+"Tea & Solace : Kathy Ashley "
Centre At(,7)+"For AMOS : Francois Lionet"
Centre At(,9)+"This game is � Top Sprite software 1991"
Centre At(,11)+"AMOS is � 1990 Mandarin/Jawx"
Centre At(,13)+"Scores are saved everytime the game ends"
Centre At(,14)+"So you can record that moment of glory! "
Centre At(,16)+"Hi-Score system v1.1"
Centre At(,18)+"Extensive documentation and source ON DISK! "
Centre At(,20)+"Thanks to Matthew Tucker for the support and help"
End Proc
' Oh Gad! An error!
Procedure HELP
' Ohhhaaaaa GAaaaddd, Aaaan Errrorrr!
Resume Next
End Proc
' Here is what the rest of Top Sprite think of Give `Em' Hell:
' M.Tucker:
' This game shows the full capabilities of Top Sprite's Top Programmer
' (Ben Ashley) What else? comparing this game to other AMOS productions
' it is like comparing Amiga's to P.C's!!
' Go out and buy it now!
' Graphics: 70 / 100
' Sound : 88 / 100
' Playability: 90 / 100
' Value : 90 / 100
' Overall : 85 / 100
'
' Message from Ben
' ----------------
' I never believed this game could actually be good. I would of given up
' if it had not been for collegues helping me out and suggesting ideas.
' So, I dedicate this game to...... Nicola Smith ( She'll kill me soon!)
'